package com.example.njut;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

public class RealWelcomctivity extends AppCompatActivity {

    boolean isFirst;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_real_welcomctivity);

        //读取数据
        SharedPreferences sp = getSharedPreferences("isFirst",MODE_PRIVATE);
        isFirst = sp.getBoolean("isFirst",true);
        //如果第一次进入，进入滑动图片页面，如果不是第一次就进入广告页面
        if(isFirst){
            startActivity(new Intent(RealWelcomctivity.this,Welcome2Activity.class));
        }else{
            startActivity(new Intent(RealWelcomctivity.this,WelcomeActivity.class));
        }
        finish();
        //实例化编辑器
        SharedPreferences.Editor editor = sp.edit();
        //存入数据
        editor.putBoolean("isFirst",false);
        //提交修改
        editor.commit();
    }

    //动画效果，旋转RotaeAnimation，伸缩ScaleAnimation，位移Tran，透明AlphaAnimation
    //Drwa画板

}
